package com.yicong.ants.bean.me.sign;

import com.cchao.simplelib.core.UiHelper;
import com.yicong.ants.R;

/**
 * @author cch
 * @version 2020/7/16
 */
public class SignItem {
    String id;
    String card_name;
    String card_no;
    String gender;
    int is_main;
    int is_self;
    String is_self_text;
    int is_self_color;
    int is_sign;

    public SignItem() {
    }

    public String getIs_self_text() {
        if (is_self == 1) {
            return "已签到";
        }
        return "非本人";
    }
    public int getIs_self_color() {
        if (is_self == 1) {
            return UiHelper.getColor(R.color.green_text_color);
        }
        return UiHelper.getColor(R.color.red_text_color);
    }

    public String getId() {
        return this.id;
    }

    public String getCard_name() {
        return this.card_name;
    }

    public String getCard_no() {
        return this.card_no;
    }

    public String getGender() {
        return this.gender;
    }

    public int getIs_main() {
        return this.is_main;
    }

    public int getIs_self() {
        return this.is_self;
    }

    public int getIs_sign() {
        return this.is_sign;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setCard_name(String card_name) {
        this.card_name = card_name;
    }

    public void setCard_no(String card_no) {
        this.card_no = card_no;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public void setIs_main(int is_main) {
        this.is_main = is_main;
    }

    public void setIs_self(int is_self) {
        this.is_self = is_self;
    }

    public void setIs_self_text(String is_self_text) {
        this.is_self_text = is_self_text;
    }

    public void setIs_self_color(int is_self_color) {
        this.is_self_color = is_self_color;
    }

    public void setIs_sign(int is_sign) {
        this.is_sign = is_sign;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof SignItem)) return false;
        final SignItem other = (SignItem) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
        final Object this$card_name = this.getCard_name();
        final Object other$card_name = other.getCard_name();
        if (this$card_name == null ? other$card_name != null : !this$card_name.equals(other$card_name))
            return false;
        final Object this$card_no = this.getCard_no();
        final Object other$card_no = other.getCard_no();
        if (this$card_no == null ? other$card_no != null : !this$card_no.equals(other$card_no))
            return false;
        final Object this$gender = this.getGender();
        final Object other$gender = other.getGender();
        if (this$gender == null ? other$gender != null : !this$gender.equals(other$gender))
            return false;
        if (this.getIs_main() != other.getIs_main()) return false;
        if (this.getIs_self() != other.getIs_self()) return false;
        final Object this$is_self_text = this.getIs_self_text();
        final Object other$is_self_text = other.getIs_self_text();
        if (this$is_self_text == null ? other$is_self_text != null : !this$is_self_text.equals(other$is_self_text))
            return false;
        if (this.getIs_self_color() != other.getIs_self_color()) return false;
        if (this.getIs_sign() != other.getIs_sign()) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof SignItem;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $id = this.getId();
        result = result * PRIME + ($id == null ? 43 : $id.hashCode());
        final Object $card_name = this.getCard_name();
        result = result * PRIME + ($card_name == null ? 43 : $card_name.hashCode());
        final Object $card_no = this.getCard_no();
        result = result * PRIME + ($card_no == null ? 43 : $card_no.hashCode());
        final Object $gender = this.getGender();
        result = result * PRIME + ($gender == null ? 43 : $gender.hashCode());
        result = result * PRIME + this.getIs_main();
        result = result * PRIME + this.getIs_self();
        final Object $is_self_text = this.getIs_self_text();
        result = result * PRIME + ($is_self_text == null ? 43 : $is_self_text.hashCode());
        result = result * PRIME + this.getIs_self_color();
        result = result * PRIME + this.getIs_sign();
        return result;
    }

    public String toString() {
        return "SignItem(id=" + this.getId() + ", card_name=" + this.getCard_name() + ", card_no=" + this.getCard_no() + ", gender=" + this.getGender() + ", is_main=" + this.getIs_main() + ", is_self=" + this.getIs_self() + ", is_self_text=" + this.getIs_self_text() + ", is_self_color=" + this.getIs_self_color() + ", is_sign=" + this.getIs_sign() + ")";
    }
}
